# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libaccounts-qt
pkgver=1.16
pkgrel=1
arch="all"
url="https://gitlab.com/accounts-sso/libaccounts-qt"
pkgdesc="Qt-based client library for the accounts database"
license="LGPL-2.1-or-later"
depends_dev="libaccounts-glib-dev"
makedepends="$depends_dev qt5-qtbase-dev qt5-qttools-dev qtchooser doxygen graphviz"
source="https://gitlab.com/accounts-sso/libaccounts-qt/-/archive/VERSION_$pkgver/libaccounts-qt-VERSION_$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # Requires systemd feature
builddir="$srcdir/$pkgname-VERSION_$pkgver"

build() {
	qmake-qt5 \
		PREFIX=/usr \
		LIBDIR=/usr/lib
	make
}

check() {
	make check
}

package() {
	INSTALL_ROOT="$pkgdir" make install

	# Remove installed test
	rm "$pkgdir"/usr/bin/accountstest
}

sha512sums="a2a65899a258ac41c67fe496ba14468a95615fe8cfc518b7aaf7d3e72e0088304c61f5d76d50bd26a95b5f56dea4d0191bf08ecead508286504161aa05b7a05b  libaccounts-qt-VERSION_1.16.tar.gz"
